//
//  OneDayOneTableViewCell.m
//  news
//
//  Created by imacbookair on 16/3/10.
//  Copyright © 2016年 imacbookair. All rights reserved.
//

#import "OneDayOneTableViewCell.h"

@implementation OneDayOneTableViewCell


#pragma mark - 初始化

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 背景图片
        self.bottom = [[UIImageView alloc]init];
        _bottom.layer.cornerRadius = 3;
        _bottom.clipsToBounds = YES;
        _bottom.image = [UIImage imageNamed:@"bai"];
        _bottom.layer.borderWidth = 0.2;
        _bottom.layer.borderColor = [UIColor grayColor].CGColor;
        
        
        // 图片
        self.picture = [[UIImageView alloc]init];
        
        
        // title
        self.title = [[UILabel alloc]init];
        _title.numberOfLines = 0;
        _title.font = [UIFont systemFontOfSize:20];
        
        
        // 主题
        self.content = [[UILabel alloc]init];
        _content.textColor = [UIColor grayColor];
        _content.font = [UIFont systemFontOfSize:15];
        _content.numberOfLines = 0;
        
        
        
        // 详细内容
        self.contentCount = [[UILabel alloc]init];
        _contentCount.textColor = [UIColor grayColor];
        _contentCount.font = [UIFont systemFontOfSize:15];
        
        
        [self.contentView addSubview:self.bottom];
        [self.bottom addSubview:_picture];
        [self.bottom addSubview:_title];
        [self.bottom addSubview:_content];
        [self.bottom addSubview:_contentCount];
        
        [_bottom NightWithType:UIViewColorTypeNormal];
        [_picture NightWithType:UIViewColorTypeNormal];
        [_title NightWithType:UIViewColorTypeNormal];
        [_content NightWithType:UIViewColorTypeNormal];
        [_contentCount NightWithType:UIViewColorTypeNormal];
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.bottom.frame = CGRectMake(5, 10, 360, 110);
    self.picture.frame = CGRectMake(5, 10, 100, 90);
    self.title.frame = CGRectMake(110, 0, 250, 60);
    self.content.frame = CGRectMake(110, 50, 250, 60);
    self.contentCount.frame = CGRectMake(280, 80, 100, 30);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
